package com.demo.exception;

import lombok.Getter;

/**
 * Author:  Hardy
 * Date:    2018/7/18 20:05
 * Description:
 **/
public class SrvException extends RuntimeException {

    @Getter
    private int code = 5000;

    public SrvException(SrvErrCode errCode) {
        super(errCode.message());
        this.code = errCode.code();
    }

    public SrvException(SrvErrCode errCode, String message) {
        super(message);
        this.code = errCode.code();
    }
}
